#

CC	= cc
CFLAGS	= -Wall -O2 -g
#CFLAGS	= -Wall -O2 
TARGETS	= functions_disk
ROBJ	= functions_disk.o disks.o util_fdisk.o util_gpart.o geom_mbr_enc.o
FOBJ	= functions_disk.o disks.o utils/util_fdisk.o utils/util_gpart.o utils/geom_mbr_enc.o
#SOURCES	= functions_disk.c disks.c utils/util_fdisk.c utils/util_gpart.c utils/geom_mbr_enc.c
LIBS	= -lgeom -lbsdxml -lsbuf
#LIBS	= -lssl -lcrypto

all: $(TARGETS)

.c.o:
	$(CC) $(CFLAGS) -c $<

functions_disk: $(FOBJ) 
	$(CC) $(CFLAGS) -o $@ $(ROBJ) $(LIBS) 

clean:
	rm -f $(TARGETS) *.o *.core

test: test.o
	$(CC) $(CFLAGS) -o $@ test.o $(LIBS)
